import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import MyRecommend from '@/components/MyRecommend/MyRecommend'
import MySinger from '@/components/MySinger/MySinger'
import MyRank from '@/components/MyRank/MyRank'
import MySearch from '@/components/MySearch/MySearch'
import MySingerDetail from '@/components/MySingerDetail/MySingerDetail'
import MySongListDetail from '@/components/MySongListDetail/MySongListDetail'
import MyRankDetail from '@/components/MyRankDetail/MyRankDetail'
import MyUser from '@/components/MyUser/MyUser'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      redirect: '/recommend'
    },
    {
      path: '/recommend',
      name: 'recommend',
      component: MyRecommend,
      children: [{
        path: ':id',
        name: 'songlistdetail',
        component: MySongListDetail
      }]
    },
    {
      path: '/singer',
      name: 'singer',
      component: MySinger,
      children: [{
        path: ':id',
        name: 'singerdetail',
        component: MySingerDetail
      }]
    },
 
    {
      path: '/rank',
      name: 'rank',
      component: MyRank,
      children: [{
        path: ':id',
        name: 'rankdetail',
        component: MyRankDetail
      }]
    },
    // {
    //   path: '/search',
    //   name: 'search',
    //   component: MySearch,
    //   children: [{
    //     path: ':id',
    //     component: MySingerDetail
    //   }]
    // }
  ]
})
